import request from "../request.js"

/**
 *  消息相关的请求接口
 */
const token = uni.getStorageSync('token');
export default {
	//获取与某位用户的历史记录，传入该用户的id
	historyList(userId,queryParams) {
		return request("/message/history/list/"+userId, "POST", queryParams)
	},
	
	//根据类型获取用户的历史记录,传入消息的类型
	historyListByType(type,queryParams) {
		return request("/message/historyByType/"+type, "POST", queryParams)
	},
	
	//获取与某位用户的历史记录，传入该用户的id
	dialogueList(queryParams) {
		return request("/message/dialogue/list", "POST", queryParams,true)
	},
	
	//根据消息类型查询未读记录数
	unreadByType(type){
		return request("/message/unread/"+type, "GET",null,true)
	}
}
